﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using WPF_MVVM_PathSearchUtil.Models;
using WPF_MVVM_PathSearchUtil.util;

namespace WPF_MVVM_PathSearchUtil.service
{
    public interface MainWindowService
    {
        /// <summary>
        /// 抽出
        /// </summary>
        /// <param name="fileList"></param>
        /// <param name="searchPath"></param>
        /// <param name="isChecked"></param>
        /// <returns></returns>
        Resp WithdrawPath(ref ObservableCollection<FileInfoModel> fileList, string searchPath, bool isChecked);

        /// <summary>
        /// 检索
        /// </summary>
        /// <param name="findResult"></param>
        /// <param name="fileList"></param>
        /// <param name="findWord"></param>
        /// <returns></returns>
        Resp Find(ref ObservableCollection<int> findResult, ObservableCollection<FileInfoModel> fileList, string findWord);

        /// <summary>
        /// 检索下一个
        /// </summary>
        /// <param name="findResult"></param>
        /// <param name="fileList"></param>
        /// <param name="findWord"></param>
        /// <param name="indexNow"></param>
        /// <returns></returns>
        Resp SearchNext(ref ObservableCollection<int> findResult, ObservableCollection<FileInfoModel> fileList, string findWord,int indexNow);

        /// <summary>
        /// 读取
        /// </summary>
        /// <param name="access"></param>
        /// <returns></returns>
        Resp ReadByServerOrLocal(CSVReadOrWrite access, ref ObservableCollection<FileInfoModel> fileList);

        /// <summary>
        /// 导入
        /// </summary>
        /// <param name="access"></param>
        /// <param name="fileList"></param>
        /// <returns></returns>
        Resp WriteByServerOrLocal(CSVReadOrWrite access, ObservableCollection<FileInfoModel> fileList );

        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="fileList"></param>
        /// <param name="isDESC"></param>
        /// <param name="e"></param>
        Resp ToSort(ref ObservableCollection<FileInfoModel> fileList, ref int[] isDESC, DataGridSortingEventArgs e);

    }
}
